<?php
	abstract class baseStruct{
			
			public $Thmplate;
			public $TableStruct;
			
			
			abstract function getDefults();
			
			function getTemplate(){
			 	if(is_null($this->Thmplate)){
					$this->Thmplate = $this->getDefults();
				 }
				 return $this->Thmplate;
			}
			function setTableStruct(TableStruct $TableStruct){
					$this->TableStruct = &$TableStruct;
					return $this;
			}
			function setTableFiled($tableFiled){
					$this->TableFiled = $tableFiled;
					return $this;
			}
			function getTableFiled(){
				 return $this->TableStruct->getField();
			}
			function getTableStruct(){
				return $this->TableStruct;		
			}
			function replace($search,$replace){
				$this->Thmplate = str_replace($search,$replace,$this->getTemplate());	
				return $this;
			}			
			function getResults(){
				return $this->Thmplate;
			}
	}